<div class="col-md-9">
	<?php
		$id = security($_POST['kode']);
		$nominal = security($_POST['nominal']);
		$nama_bank = security($_POST['nama_bank']);
		$no_rek = security($_POST['no_rek']);
		$nama_pemilik = security($_POST['nama']);
		$bank = $_POST['bank'];
		$tanggal = str_replace("/","-","$_POST[tanggal]");

		$cek = $koneksi->query("select id_orders from orders where id_orders = '$id'");
		$ketemu = $cek->rowCount();
		
		if($ketemu > 0){
			$simpan = $koneksi->exec("insert into konfirmasi (id_orders, nominal, nama_bank, no_rek, nama_pemilik, id_bank, tgl_transfer) values ('$id',$nominal,'$nama_bank','$no_rek','$nama_pemilik',$bank,'$tanggal')");

			$url_sukses = "home.aspx";
			if($simpan){
				echo "<meta http-equiv='refresh' content='0; url=$url_sukses'>";
				exit;
			}else{
				echo mysql_error();
			}
		}else{
			?>
			<script>
				alert("Mohon maaf ID Order yang anda masukkan salah..");
			</script>
			<?php
			echo "<meta http-equiv='refresh' content='0; url=konfirmasi.aspx'>";
		}
	?>
</div>